﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Edit.aspx.cs" Inherits="SysAdmin_Role_Edit" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <script type="text/javascript">
        $(function () {
            $('#role_edit_combotree').combotree({
                url: 'Ashx/GetAllPower.ashx',
                parentField: 'pid',
                lines: true,
                multiple: true,
                onlyLeafCheck: true,
                onLoadSuccess: function () {
                    //加载默认选中值  ['P_SysMenu_Add','P_SysMenu_Edit','P_SysMenu_Del']
                    var checkValue = (new Function("return " + document.getElementById("power_ids").value))();
                    $('#role_edit_combotree').combotree('setValues', checkValue);
                }
            });
        });
    </script>
    <div style="text-align: center;">
        <form id="admin_role_editForm" method="post">
            <input type="hidden" id="power_ids" name="power_ids" value="<%=power_ids %>" />
            <input type="hidden" id="role_key" name="role_key" value="<%=role_key %>" />
            <table class="tableForm">
                <tr>
                    <th>角色名称</th>
                    <td>
                        <input id="roleName" name="roleName" class="easyui-validatebox" data-options="required:true" value="<%=role_name %>" /></td>
                </tr>
                <tr>
                    <th>可访问资源</th>
                    <td>
                        <input id="role_edit_combotree" name="role_edit_combotree" style="width: 370px;" /><img src="Images/cut_red.png" onclick="$('#role_edit_combotree').combotree('clear');" /></td>
                </tr>
            </table>
        </form>
    </div>
</body>
</html>
